package com.eastdigit.shiro.authc;

import org.apache.shiro.authc.AuthenticationToken;

public class StatelessToken implements AuthenticationToken {

    /**
	 * 
	 */
	private static final long serialVersionUID = -3494168560921360240L;
	
	private String userId;
    private String tokenId;

    public StatelessToken(String userId, String tokenId) {
        this.userId = userId;
        this.tokenId = tokenId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTokenId() {
		return tokenId;
	}

	public void setTokenId(String tokenId) {
		this.tokenId = tokenId;
	}

	@Override
    public Object getPrincipal() {
        return userId;
    }

    @Override
    public Object getCredentials() {
        return tokenId;
    }
}
